import {
  createRouter,
  createWebHashHistory
} from 'vue-router';


const routes = [{
    path: '/',
    component: () => import('../views/main.vue'),
    meta: {
      title: '首页'
    },
    children: [{
        path: '',
        redirect: 'welcome'
      },
      {
        path: 'welcome',
        component: () => import('../views/welcome.vue'),
        meta: {
          title: '欢迎页'
        }
      },
    ]
  },
  {
    path: '/login',
    component: () => import('../views/login.vue'),
    meta: {
      title: '登录'
    }
  },
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router